// 获取应用实例
const app = getApp()
// import Toast from '@vant/weapp/toast/toast';

Page({
  data: {
    value: '',
    background: ['https://img2.baidu.com/it/u=1197304554,1372481836&fm=253&fmt=auto&app=138&f=JPEG?w=751&h=500', 'https://img2.baidu.com/it/u=2636964733,2971876106&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500', 'https://img2.baidu.com/it/u=4196410092,1649904946&fm=253&fmt=auto&app=138&f=JPEG?w=780&h=500', 'https://img1.baidu.com/it/u=2992231021,4133791572&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=334'],
    indicatorDots: true,
    vertical: false,
    autoplay: true,
    interval: 2500,
    duration: 500,
    gridData: [{
        id: '0',
        img: '../../static/sc.png',
        name: '蔬菜'
      },
      {
        id: '1',
        img: '../../static/sg.png',
        name: '水果'
      },
      {
        id: '2',
        img: '../../static/hx.png',
        name: '海鲜'
      },
      {
        id: '4',
        img: '../../static/r.png',
        name: '肉类'
      },
      {
        id: '3',
        img: '../../static/n.png',
        name: '奶制品'
      },
      {
        id: '5',
        img: '../../static/tl.png',
        name: '调味料'
      }
    ],
    ertonglist: [{
        "id": 0,
        "img": "https://img2.baidu.com/it/u=2999604701,2301913073&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=c58d1ba5bb58db9e0cab6f5bed6829dd",
        "name": "西红柿"
      },
      {
        "id": 1,
        "img": "https://img0.baidu.com/it/u=3154218140,1158011866&fm=253&app=120&size=w931&n=0&f=PNG&fmt=auto?sec=1687798800&t=56a20996234181e0d52fad5209008800",
        "name": "胡萝卜"
      },
      {
        "id": 2,
        "img": "https://img1.baidu.com/it/u=1801594712,290317279&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=92786f075f197bea163aa60b27ba89cc",
        "name": "生菜"
      },
      {
        "id": 3,
        "img": "https://img1.baidu.com/it/u=2190283767,2707094698&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=a984ecb5c7cf7ead13878c712e9fb470",
        "name": "猪肉"
      },
      {
        "id": 4,
        "img": "https://img0.baidu.com/it/u=1470130154,3556805314&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=600071ffab9cba400dd9fc19ddd94d33",
        "name": "鸡肉"
      }
    ],
    ertonglist1: [{
        "id": 0,
        "img": "https://img1.baidu.com/it/u=181658252,3520137778&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=eddfc8d3f8d07a603ea2aba981af7524",
        "name": "绿花菜"
      },
      {
        "id": 1,
        "img": "https://img2.baidu.com/it/u=1019083096,2507851167&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=b84c2ca80aa924756a3fcbbb570054bc",
        "name": "菠菜"
      },
      {
        "id": 2,
        "img": "https://img1.baidu.com/it/u=2670171351,4177804428&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=58b63ce30dec5203ec3ae051e9e1bdc9",
        "name": "甘蓝"
      },
      {
        "id": 3,
        "img": "https://img1.baidu.com/it/u=1873673294,3908143280&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=c761728acc381547540c6dc6ac5a28e2",
        "name": "鸭肉"
      },
      {
        "id": 4,
        "img": "https://img0.baidu.com/it/u=1921682993,1797849273&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=3a31ae2e64e05ee5b4a20fff9ae197b4",
        "name": "鹅肉"
      }
    ],
    ertonglist2: [{
        "id": 0,
        "img": "https://img2.baidu.com/it/u=36750757,1142442471&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=e0aaa99f12c09aa4804b24b39efd6c31",
        "name": "南瓜"
      },
      {
        "id": 1,
        "img": "https://img1.baidu.com/it/u=3794871115,3519904166&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=160696a6a28d2397191b44d81fbb4e0f",
        "name": "茼蒿"
      },
      {
        "id": 2,
        "img": "https://img1.baidu.com/it/u=3414717247,4070880506&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=0b332caf2e52c8a18e177b1aa91dc51b",
        "name": "莴笋"
      },
      {
        "id": 3,
        "img": "https://img1.baidu.com/it/u=2553627105,3044222050&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=4093913486d77fa91ea8d0662d695177",
        "name": "牛肉"
      },
      {
        "id": 4,
        "img": "https://img2.baidu.com/it/u=2761285854,3247738915&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=a13873b1d9006aaaaa04048b09a4f0d2",
        "name": "海鱼"
      }
    ],
    ertonglist3: [{
        "id": 0,
        "img": "https://img1.baidu.com/it/u=3168527595,3186549934&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=7b0cec3f56cf257d0ae8501ee2b0ee87",
        "name": "包菜"
      },
      {
        "id": 1,
        "img": "https://img2.baidu.com/it/u=101951649,2419596617&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=d081b49f7bb2bc6aef71e84a45697777",
        "name": "牙白"
      },
      {
        "id": 2,
        "img": "https://img0.baidu.com/it/u=3395502186,511159552&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=ad441aaa9ab7738295839e5b91d8d178",
        "name": "冬瓜"
      },
      {
        "id": 3,
        "img": "https://img0.baidu.com/it/u=1470130154,3556805314&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=600071ffab9cba400dd9fc19ddd94d33",
        "name": "鸡肉"
      },
      {
        "id": 4,
        "img": "https://img1.baidu.com/it/u=1285924258,1537824429&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=054058a2d5966446ec95e6a9bc0d1c37",
        "name": "鱼肉"
      }
    ],
    ertonglist4: [{
        "id": 0,
        "img": "https://img0.baidu.com/it/u=2931492204,204725614&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=bcf889bc94670d104a2dcece94959bbe",
        "name": "油菜"
      },
      {
        "id": 1,
        "img": "https://img0.baidu.com/it/u=3653745247,3589419859&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=df9b1eb49a6ae8cde0dc2661a2e1cda6",
        "name": "西红柿"
      },
      {
        "id": 2,
        "img": "https://img0.baidu.com/it/u=1715893722,4072453391&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=9c0fcda00d864ea4c92747c2f73ee623",
        "name": "胡萝卜"
      },
      {
        "id": 3,
        "img": "https://img1.baidu.com/it/u=2613729053,2427589760&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=8fd83fc685598ae748707cd4cbec77f0",
        "name": "虾"
      },
      {
        "id": 4,
        "img": "https://img1.baidu.com/it/u=110801772,1637033954&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1687798800&t=ae13d58a9207bc6bc2902f6ca8485992",
        "name": "鱼肉"
      }
    ],
  },
  onLoad() {},
  goChange(e) {
    // Toast('暂未开放');
    wx.reLaunch({
      url: '/pages/classification/classification?name=' + e.currentTarget.dataset.name,
    })
  },
  goParticulars(e) {
    wx.navigateTo({
      url: '/pages/particulars/particulars?title=' + e.currentTarget.dataset.title,
    })
  },
  goParticularslnr(e) {
    wx.navigateTo({
      url: '/pages/oldMan/oldMan?title=' + e.currentTarget.dataset.title,
    })
  },
  goParticularsqsn(e){
    wx.navigateTo({
      url: '/pages/youth/youth?title=' + e.currentTarget.dataset.title,
    })
  },
  goParticularsyf(e){
    wx.navigateTo({
      url: '/pages/pregnant/pregnant?title=' + e.currentTarget.dataset.title,
    })
  },
  goParticularsyye(e){
    wx.navigateTo({
      url: '/pages/baby/baby?title=' + e.currentTarget.dataset.title,
    })
  }
  // onChange(e) {
  //   this.setData({
  //     value: e.detail,
  //   });
  // },
  // onSearch() {
  //   console.log('搜索' + this.data.value);
  // },
  // onClick() {
  //   console.log('搜索' + this.data.value);
  // },
})